//
//  PopMenu.h
//  Weibo
//
//  Created by Anasue on 9/11/15.
//  Copyright (c) 2015 Anasue. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum {
    PopMenuArrowPositionCenter = 0,
    PopMenuArrowPositionLeft = 1,
    PopMenuArrowPositionRight = 2
}PopMenuArrowPosition;

@class PopMenu;

@protocol PopMenuDelegate <NSObject>

@optional
- (void)popMenuDidDismissed:(PopMenu *)popMenu;

@end

@interface PopMenu : UIView

@property (nonatomic, assign) PopMenuArrowPosition arrowPosition;
@property (nonatomic, assign, getter=isdimBackGround) BOOL dimBackground;
@property (nonatomic, weak) id<PopMenuDelegate> delegate;

/**
 *  初始化方法
 */
- (instancetype)initWithContentView:(UIView *)contentView;
+ (instancetype)popMenuWithContentView:(UIView *)contentView;

- (void)setArrowPosition:(PopMenuArrowPosition)arrowPosition;
- (void)setDimBackground:(BOOL)dimBackground;
- (void)showInRect:(CGRect)rect;



@end
